 $(document).ready(function(){

		
		var flag1 = true;
		var flag2 = true;
		var flag3 = true;
		var flag4 = true;
		var flag5 = true;
		var flag6 = true;
		var flag7 = true;
		var flag8 = true;
		var flag9 = true;
		var flag10 = true;
		
		// Applicant 1
		$("#expiration_yyyy_1").change(function(){
			var expiration_mm_1		=	$("#expiration_mm_1").val();
			var expiration_dd_1		=	$("#expiration_dd_1").val();
			var expiration_yyyy_1	=	$("#expiration_yyyy_1").val();
			var ex_integrate		=	expiration_mm_1+'/'+expiration_dd_1+'/'+expiration_yyyy_1;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag1 = true;
				$("#error_1").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_1").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag1 = false;
			return false;
			
		});
		
		$("#expiration_dd_1").change(function(){
			var expiration_mm_1		=	$("#expiration_mm_1").val();
			var expiration_dd_1		=	$("#expiration_dd_1").val();
			var expiration_yyyy_1	=	$("#expiration_yyyy_1").val();
			var ex_integrate		=	expiration_mm_1+'/'+expiration_dd_1+'/'+expiration_yyyy_1;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag1 = true;
				$("#error_1").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_1").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag1 = false;
			return false;
			
		});
		
		$("#expiration_mm_1").change(function(){
			var expiration_mm_1		=	$("#expiration_mm_1").val();
			var expiration_dd_1		=	$("#expiration_dd_1").val();
			var expiration_yyyy_1	=	$("#expiration_yyyy_1").val();
			var ex_integrate		=	expiration_mm_1+'/'+expiration_dd_1+'/'+expiration_yyyy_1;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag1 = true;
				$("#error_1").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_1").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag1 = false;
			return false;
			
		});
		
		//Applicant 2
		$("#expiration_yyyy_2").change(function(){
			var expiration_mm_2		=	$("#expiration_mm_2").val();
			var expiration_dd_2		=	$("#expiration_dd_2").val();
			var expiration_yyyy_2	=	$("#expiration_yyyy_2").val();
			var ex_integrate		=	expiration_mm_2+'/'+expiration_dd_2+'/'+expiration_yyyy_2;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag2 = true;
				$("#error_2").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_2").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag2 = false;
			return false;
			
		});
		
		$("#expiration_dd_2").change(function(){
			var expiration_mm_2		=	$("#expiration_mm_2").val();
			var expiration_dd_2		=	$("#expiration_dd_2").val();
			var expiration_yyyy_2	=	$("#expiration_yyyy_2").val();
			var ex_integrate		=	expiration_mm_2+'/'+expiration_dd_2+'/'+expiration_yyyy_2;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag2 = true;
				$("#error_2").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_2").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag2 = false;
			return false;
			
		});
		
		$("#expiration_mm_2").change(function(){
			var expiration_mm_2		=	$("#expiration_mm_2").val();
			var expiration_dd_2		=	$("#expiration_dd_2").val();
			var expiration_yyyy_2	=	$("#expiration_yyyy_2").val();
			var ex_integrate		=	expiration_mm_2+'/'+expiration_dd_2+'/'+expiration_yyyy_2;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag2 = true;
				$("#error_2").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_2").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag2 = false;
			return false;
			
		});
		
		//Applicant 3
		$("#expiration_yyyy_3").change(function(){
			var expiration_mm_3		=	$("#expiration_mm_3").val();
			var expiration_dd_3		=	$("#expiration_dd_3").val();
			var expiration_yyyy_3	=	$("#expiration_yyyy_3").val();
			var ex_integrate		=	expiration_mm_3+'/'+expiration_dd_3+'/'+expiration_yyyy_3;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag3 = true;
				$("#error_3").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_3").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag3 = false;
			return false;
			
		});
		
		$("#expiration_dd_3").change(function(){
			var expiration_mm_3		=	$("#expiration_mm_3").val();
			var expiration_dd_3		=	$("#expiration_dd_3").val();
			var expiration_yyyy_3	=	$("#expiration_yyyy_3").val();
			var ex_integrate		=	expiration_mm_3+'/'+expiration_dd_3+'/'+expiration_yyyy_3;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag3 = true;
				$("#error_3").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_3").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag3 = false;
			return false;
			
		});
		
		$("#expiration_mm_3").change(function(){
			var expiration_mm_3		=	$("#expiration_mm_3").val();
			var expiration_dd_3		=	$("#expiration_dd_3").val();
			var expiration_yyyy_3	=	$("#expiration_yyyy_3").val();
			var ex_integrate		=	expiration_mm_3+'/'+expiration_dd_3+'/'+expiration_yyyy_3;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag3 = true;
				$("#error_3").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_3").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag3 = false;
			return false;
			
		});
		
		//Applicant 4
		$("#expiration_yyyy_4").change(function(){
			var expiration_mm_4		=	$("#expiration_mm_4").val();
			var expiration_dd_4		=	$("#expiration_dd_4").val();
			var expiration_yyyy_4	=	$("#expiration_yyyy_4").val();
			var ex_integrate		=	expiration_mm_4+'/'+expiration_dd_4+'/'+expiration_yyyy_4;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag4 = true;
				$("#error_4").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_4").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag4 = false;
			return false;
			
		});
		
		$("#expiration_dd_4").change(function(){
			var expiration_mm_4		=	$("#expiration_mm_4").val();
			var expiration_dd_4		=	$("#expiration_dd_4").val();
			var expiration_yyyy_4	=	$("#expiration_yyyy_4").val();
			var ex_integrate		=	expiration_mm_4+'/'+expiration_dd_4+'/'+expiration_yyyy_4;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag4 = true;
				$("#error_4").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_4").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag4 = false;
			return false;
			
		});
		
		$("#expiration_mm_4").change(function(){
			var expiration_mm_4		=	$("#expiration_mm_4").val();
			var expiration_dd_4		=	$("#expiration_dd_4").val();
			var expiration_yyyy_4	=	$("#expiration_yyyy_4").val();
			var ex_integrate		=	expiration_mm_4+'/'+expiration_dd_4+'/'+expiration_yyyy_4;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag4 = true;
				$("#error_4").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_4").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag4 = false;
			return false;
			
		});
		
		
		
		//Applicant 5
		$("#expiration_yyyy_5").change(function(){
			var expiration_mm_5		=	$("#expiration_mm_5").val();
			var expiration_dd_5		=	$("#expiration_dd_5").val();
			var expiration_yyyy_5	=	$("#expiration_yyyy_5").val();
			var ex_integrate		=	expiration_mm_5+'/'+expiration_dd_5+'/'+expiration_yyyy_5;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag5 = true;
				$("#error_5").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_5").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag5 = false;
			return false;
			
		});
		
		$("#expiration_dd_5").change(function(){
			var expiration_mm_5		=	$("#expiration_mm_5").val();
			var expiration_dd_5		=	$("#expiration_dd_5").val();
			var expiration_yyyy_5	=	$("#expiration_yyyy_5").val();
			var ex_integrate		=	expiration_mm_5+'/'+expiration_dd_5+'/'+expiration_yyyy_5;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag5 = true;
				$("#error_5").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_5").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag5 = false;
			return false;
			
		});
		
		$("#expiration_mm_5").change(function(){
			var expiration_mm_5		=	$("#expiration_mm_5").val();
			var expiration_dd_5		=	$("#expiration_dd_5").val();
			var expiration_yyyy_5	=	$("#expiration_yyyy_5").val();
			var ex_integrate		=	expiration_mm_5+'/'+expiration_dd_5+'/'+expiration_yyyy_5;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag5 = true;
				$("#error_5").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_5").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag5 = false;
			return false;
			
		});
		
		
		//Applicant 6
		$("#expiration_yyyy_6").change(function(){
			var expiration_mm_6		=	$("#expiration_mm_6").val();
			var expiration_dd_6		=	$("#expiration_dd_6").val();
			var expiration_yyyy_6	=	$("#expiration_yyyy_6").val();
			var ex_integrate		=	expiration_mm_6+'/'+expiration_dd_6+'/'+expiration_yyyy_6;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag6 = true;
				$("#error_6").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_6").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag6 = false;
			return false;
			
		});
		
		$("#expiration_dd_6").change(function(){
			var expiration_mm_6		=	$("#expiration_mm_6").val();
			var expiration_dd_6		=	$("#expiration_dd_6").val();
			var expiration_yyyy_6	=	$("#expiration_yyyy_6").val();
			var ex_integrate		=	expiration_mm_6+'/'+expiration_dd_6+'/'+expiration_yyyy_6;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag6 = true;
				$("#error_6").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_6").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag6 = false;
			return false;
			
		});
		
		$("#expiration_mm_6").change(function(){
			var expiration_mm_6		=	$("#expiration_mm_6").val();
			var expiration_dd_6		=	$("#expiration_dd_6").val();
			var expiration_yyyy_6	=	$("#expiration_yyyy_6").val();
			var ex_integrate		=	expiration_mm_6+'/'+expiration_dd_6+'/'+expiration_yyyy_6;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag6 = true;
				$("#error_6").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_6").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag6 = false;
			return false;
			
		});
		
		
		//Applicant 7
		$("#expiration_yyyy_7").change(function(){
			var expiration_mm_7		=	$("#expiration_mm_7").val();
			var expiration_dd_7		=	$("#expiration_dd_7").val();
			var expiration_yyyy_7	=	$("#expiration_yyyy_7").val();
			var ex_integrate		=	expiration_mm_7+'/'+expiration_dd_7+'/'+expiration_yyyy_7;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag7 = true;
				$("#error_7").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_7").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag7 = false;
			return false;
			
		});
		
		$("#expiration_dd_7").change(function(){
			var expiration_mm_7		=	$("#expiration_mm_7").val();
			var expiration_dd_7		=	$("#expiration_dd_7").val();
			var expiration_yyyy_7	=	$("#expiration_yyyy_7").val();
			var ex_integrate		=	expiration_mm_7+'/'+expiration_dd_7+'/'+expiration_yyyy_7;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag7 = true;
				$("#error_7").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_7").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag7 = false;
			return false;
			
		});
		
		$("#expiration_mm_7").change(function(){
			var expiration_mm_7		=	$("#expiration_mm_7").val();
			var expiration_dd_7		=	$("#expiration_dd_7").val();
			var expiration_yyyy_7	=	$("#expiration_yyyy_7").val();
			var ex_integrate		=	expiration_mm_7+'/'+expiration_dd_7+'/'+expiration_yyyy_7;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag7 = true;
				$("#error_7").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_7").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag7 = false;
			return false;
			
		});
		
		
		//Applicant 8
		$("#expiration_yyyy_8").change(function(){
			var expiration_mm_8		=	$("#expiration_mm_8").val();
			var expiration_dd_8		=	$("#expiration_dd_8").val();
			var expiration_yyyy_8	=	$("#expiration_yyyy_8").val();
			var ex_integrate		=	expiration_mm_8+'/'+expiration_dd_8+'/'+expiration_yyyy_8;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag8 = true;
				$("#error_8").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_8").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag8 = false;
			return false;
			
		});
		
		$("#expiration_dd_8").change(function(){
			var expiration_mm_8		=	$("#expiration_mm_8").val();
			var expiration_dd_8		=	$("#expiration_dd_8").val();
			var expiration_yyyy_8	=	$("#expiration_yyyy_8").val();
			var ex_integrate		=	expiration_mm_8+'/'+expiration_dd_8+'/'+expiration_yyyy_8;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag8 = true;
				$("#error_8").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_8").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag8 = false;
			return false;
			
		});
		
		$("#expiration_mm_8").change(function(){
			var expiration_mm_8		=	$("#expiration_mm_8").val();
			var expiration_dd_8		=	$("#expiration_dd_8").val();
			var expiration_yyyy_8	=	$("#expiration_yyyy_8").val();
			var ex_integrate		=	expiration_mm_8+'/'+expiration_dd_8+'/'+expiration_yyyy_8;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag8 = true;
				$("#error_8").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_8").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag8 = false;
			return false;
			
		});
		
		
		//Applicant 9
		$("#expiration_yyyy_9").change(function(){
			var expiration_mm_9		=	$("#expiration_mm_9").val();
			var expiration_dd_9		=	$("#expiration_dd_9").val();
			var expiration_yyyy_9	=	$("#expiration_yyyy_9").val();
			var ex_integrate		=	expiration_mm_9+'/'+expiration_dd_9+'/'+expiration_yyyy_9;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag9 = true;
				$("#error_9").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_9").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag9 = false;
			return false;
			
		});
		
		$("#expiration_dd_9").change(function(){
			var expiration_mm_9		=	$("#expiration_mm_9").val();
			var expiration_dd_9		=	$("#expiration_dd_9").val();
			var expiration_yyyy_9	=	$("#expiration_yyyy_9").val();
			var ex_integrate		=	expiration_mm_9+'/'+expiration_dd_9+'/'+expiration_yyyy_9;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag9 = true;
				$("#error_9").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_9").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag9 = false;
			return false;
			
		});
		
		$("#expiration_mm_9").change(function(){
			var expiration_mm_9		=	$("#expiration_mm_9").val();
			var expiration_dd_9		=	$("#expiration_dd_9").val();
			var expiration_yyyy_9	=	$("#expiration_yyyy_9").val();
			var ex_integrate		=	expiration_mm_9+'/'+expiration_dd_9+'/'+expiration_yyyy_9;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag9 = true;
				$("#error_9").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_9").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag9 = false;
			return false;
			
		});
		
		
		//Applicant 10
		$("#expiration_yyyy_10").change(function(){
			var expiration_mm_10	=	$("#expiration_mm_10").val();
			var expiration_dd_10	=	$("#expiration_dd_10").val();
			var expiration_yyyy_10	=	$("#expiration_yyyy_10").val();
			var ex_integrate		=	expiration_mm_10+'/'+expiration_dd_10+'/'+expiration_yyyy_10;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag10 = true;
				$("#error_10").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_10").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag10 = false;
			return false;
			
		});
		
		$("#expiration_dd_10").change(function(){
			var expiration_mm_10	=	$("#expiration_mm_10").val();
			var expiration_dd_10	=	$("#expiration_dd_10").val();
			var expiration_yyyy_10	=	$("#expiration_yyyy_10").val();
			var ex_integrate		=	expiration_mm_10+'/'+expiration_dd_10+'/'+expiration_yyyy_10;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag10 = true;
				$("#error_10").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_10").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag10 = false;
			return false;
			
		});
		
		$("#expiration_mm_10").change(function(){
			var expiration_mm_10	=	$("#expiration_mm_10").val();
			var expiration_dd_10	=	$("#expiration_dd_10").val();
			var expiration_yyyy_10	=	$("#expiration_yyyy_10").val();
			var ex_integrate		=	expiration_mm_10+'/'+expiration_dd_10+'/'+expiration_yyyy_10;
			
			var date_arrive			=	$("#arrival_date").val();
			var substr				=	date_arrive.split('/');
			var day_arrival			=	substr[1];
			var month_arrival		=	substr[0];
			var year_arrival		=	substr[2];
			
			var day_expire			=	day_arrival;
			var month_expire		=	"";
			var year_expire			=	"";
			switch (month_expire) {
				case 7:
					month_expire	=	1;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 8:
					month_expire	=	2;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 9:
					month_expire	=	3;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 10:
					month_expire	=	4;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 11:
					month_expire	=	5;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
				case 12:
					month_expire	=	6;
					year_expire		=	parseFloat(year_arrival) + 1;
					break;
	
				default:
					month_expire	=	parseFloat(month_arrival) + 6;
					year_expire		=	year_arrival;
					break;
			}
			
			date_expiration		=	month_expire+'/'+day_expire+'/'+year_expire;
			
			if(new Date(ex_integrate.toString()) > new Date(date_expiration.toString())){
				flag10 = true;
				$("#error_10").html('<span style="display:none;" class="error">Expiration date does not match</span>');
				return true;
				
			}
			$("#error_10").html('<span style="color:red;" class="error">Expiration date does not match</span>');
			flag10 = false;
			return false;
			
		});
		
		
		$(".submit").click(function(){
			if(flag1 == false || flag2 == false || flag3 == false || flag4 == false || flag4 == false || flag5 == false || flag6 == false || flag7 == false || flag8 == false || flag9 == false || flag10 == false ){
				alert('One of passport expiration has problem. Please check it again.');
				return false;
			}	
		});
		
		
 });